# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ExportModelRequestOutputConfig do
  @moduledoc """
  Output configuration for the Model export.

  ## Attributes

  *   `artifactDestination` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GcsDestination.t`, *default:* `nil`) - The Cloud Storage location where the Model artifact is to be written to. Under the directory given as the destination a new one with name "`model-export--`", where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, will be created. Inside, the Model and any of its supporting files will be written. This field should only be set when the `exportableContent` field of the [Model.supported_export_formats] object contains `ARTIFACT`.
  *   `exportFormatId` (*type:* `String.t`, *default:* `nil`) - The ID of the format in which the Model must be exported. Each Model lists the export formats it supports. If no value is provided here, then the first from the list of the Model's supported formats is used by default.
  *   `imageDestination` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ContainerRegistryDestination.t`, *default:* `nil`) - The Google Container Registry or Artifact Registry uri where the Model container image will be copied to. This field should only be set when the `exportableContent` field of the [Model.supported_export_formats] object contains `IMAGE`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :artifactDestination =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GcsDestination.t() | nil,
          :exportFormatId => String.t() | nil,
          :imageDestination =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ContainerRegistryDestination.t()
            | nil
        }

  field(:artifactDestination,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GcsDestination
  )

  field(:exportFormatId)

  field(:imageDestination,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ContainerRegistryDestination
  )
end

defimpl Poison.Decoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ExportModelRequestOutputConfig do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ExportModelRequestOutputConfig.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ExportModelRequestOutputConfig do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
